package Leetcode_LCP;

/**
 * @author : K k
 * @date : 13:59 2020/9/11
 */
public class 二叉树任务调度_10 {

    public double minimalExecTime(TreeNode root) {
        return 1.0;
    }

    //后序遍历
    public double post(TreeNode node,double supply){
        if (node==null){return 0.0;}
        double num=0.0;
        if (node.left==null && node.right==null){
            return node.val;
        }

        //后序处理
        if (node.right!=null&&node.left!=null){
            double sp=(double)(node.left.val>=node.right.val?node.left.val-node.right.val:node.right.val-node.left.val)/2;
            post(node.left,sp);
            post(node.right,sp);
        }
        num+=node.val-supply;
        return num;
    }

    public static void main(String[] args) {
        double x=1.0;
        System.out.println(x/2);
    }
}
